/**
 * 登录接口
 * @type {string} POST
 * @param {string} {appId:小程序appId  code:登录授权code   appSecret:小程序appSecret }
 */
export function Login(data) {
	return new Promise(resolve => {
		uni.$u.http.post("/applet/appletUser/authorized", data).then(info => {
			resolve(info.result)
		})
	})
}
/**
 * 登录接口
 * @type {string} get
 * @param {string} {openId:微信openId ,unionId:微信 }
 */
export function selectAuthorizedUser(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/appletUser/selectAuthorizedUser", data).then(info => {
			resolve(info.result)
		})
	})
}
/**
 * 保存微信用户
 * @type {string} post
 * @param {string} {openId:微信openId ,unionId:微信 }
 */
export function saveWeUser(data) {
	return new Promise(resolve => {
		uni.$u.http.post("/applet/appletUser/saveWeUser", data).then(info => {
			resolve(info.result)
		})
	})
}
/**
 * 根据code获取微信用户手机号码
 * @type {string} GET
 * @param {string} {code,appId }
 */
export function selectPhoneNumberByCode(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/appletUser/selectPhoneNumberByCode", data).then(info => {
			resolve(info.result)
		})
	})
}